<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/view/common/taglibs.jsp"%>
<html>
	<head>
		<title>系统菜单管理-金融风险管理系统</title>
		<script src="${contextPath}/scripts/jquery/jquery-1.8.3.min.js" type="text/javascript"></script>
		<script src="${contextPath}/scripts/common.js" type="text/javascript"></script>
		<script src="${contextPath}/scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
		<link href="${contextPath}/styles/default.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript">
		function jumpPage(page) {
			var searchForm = document.searchForm;
			searchForm.action = "<s:property value='contextPath'/>/system/menu/index.do?currentPage=" + page;
			searchForm.submit();
		}
		
		function editData(id) {
			var searchForm = document.searchForm;
			searchForm.action = "<s:property value='contextPath'/>/system/menu/edit.do?currentPage=${currentPage}&id="+id;
			searchForm.submit();
		}
			
		function deleteData(id) {
			if(confirm("确认要删除吗?")) {
				var searchForm = document.searchForm;
				searchForm.action = "<s:property value='contextPath'/>/system/menu/destory.do?currentPage=${currentPage}&id="+id;
				searchForm.submit();
			}	  
		}
		
		function selall(){
			$("input[name='mid\[\]']").attr('checked','checked');
		}
		
		function noselall(){
			$("input[name='mid\[\]']").attr('checked',false);
		}

		</script>
	</head>
	<body>
	<div class="navigation">
	    <span>
	    <a href="javascript:window.history.forward();"><img src="${contextPath}/images/go_nav_btn.png" /></a>
	     <a href="javascript:window.history.forward();">前进</a>
	    <a href="javascript:window.location.reload();"><img src="${contextPath}/images/refresh_nav_btn.png" /></a>
	     <a href="javascript:window.location.reload();">刷新</a>
	    </span>系统管理&gt;&gt;菜单管理
    </div>
    <div class="xt_main_right_center">
      <form name="searchForm" id="searchForm" method="post" action="index.do">
      <table width="100%" border="0" cellpadding="0" cellspacing="0"  style="border-color:#CCCCCC;">
	        <tr>
	          <td class="left-td-width-bg">
	   				  <span>菜单名:</span>
	            </td>
	            <td class="right-td-width-bg-left">
	             <input type="text" name='search.name' class="input" value="${search.name}"/>
	            </td>
	            <td class="left-td-width-bg">
	            	&nbsp;
	            </td>
	            <td>&nbsp;</td>
	        </tr>
	        
		     <tr style="background:url(${contextPath}/images/xt_main_right_dhbj.jpg) repeat-x;">
			    <td height="28" colspan="6" align="right" style="border-bottom:none;">
			    	<input type="button" class="btn_clear_form" onclick="clearForm(this.form);return false;"/>
			    	<input name="" type="submit" name="submit" value=""  class="btn_query"/>
			    </td>
		    </tr>
	      </table>
      </form>
      </div>
      
      <br/>
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
		  <tr>
		    <td height="25" align="left"><font color="#0066CC"><strong>查询结果：</strong></font></td>
		    <td height="25" align="right">
		  	  <a href="add.do"><img src="${contextPath}/images/btn_add.png" alt="新增" /></a>
            </td>
		  </tr>
		</table>
		      
        <table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
		  <tr>
    		        <td width="3%" class="top-td-width-bg">序号</td>
    		        <td width="8%" class="top-td-width-bg">编码</td>
				    <td width="15%" class="top-td-width-bg">菜单名</td>
				    <td width="26%" class="top-td-width-bg">链接地址</td>
				    <td width="5%" class="top-td-width-bg">打开方式</td>
				    <td width="8%" class="top-td-width-bg">等级</td>
				    <td width="8%" class="top-td-width-bg">排序</td>
				    <td width="14%" class="top-td-width-bg">创建时间</td>
				    <td width="6%" class="top-td-width-bg">增加子项</td>
<!-- 			        <td width="5%" class="top-td-width-bg">操作</td> -->
		  </tr>
		  
 <s:iterator value="page.result" status="s">
	<tr> 
	  <td class="down-center-td-width-bg">${s.index+1}</td>
	  <td class="down-left-td-width-bg">
	 	 <s:property value="code" />
	  </td>
	  <td class="down-left-td-width-bg">
	  	<s:if test="grade != 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	  	</s:if>
	  	<s:property value="name"/>
	  </td>
	  <td align="left" class="down-left-td-width-bg">
	  	<a href="<s:property value="%{convertLink(link)}"/>"><s:property value="link"/></a>
	  </td> 
	  <td class="down-center-td-width-bg">
	  	<s:property value="target"/>
	  </td>
	  <td class="down-center-td-width-bg">
	  	<s:property value="grade"/>
	  </td>
	  <td class="down-center-td-width-bg">
		<s:property value="order"/>
	 </td>
	  <td class="down-center-td-width-bg">
	  	<s:property value="createdAt"/>
	  </td>
	  <td class="down-center-td-width-bg">
	   <s:if test="grade == 1">
	    <a href="add.do?parentId=<s:property value="id"/>"  title="增加子菜单"><img src="${contextPath}/images/add.png" alt="增加子菜单" width="16" height="13" border="0" /></a>
	    </s:if>
	  </td>
<!-- 	  <td class="down-center-td-width-bg"> -->
<%-- 	    <a href="javascript:editData(<s:property value="id"/>);"><img src="${contextPath}/images/edit.gif" alt="编辑" width="16" height="13" border="0" /></a> --%>
<%-- 	    <a href="javascript:deleteData(<s:property value="id"/>)"><img src="${contextPath}/images/del.gif" alt="删除" width="16" height="13" border="0" /></a> --%>
<!-- 	  </td> -->
	</tr>
</s:iterator>		  
		<tr>
		 <td height="36" colspan="10" class="down-center-td-width-bg" align="right">
			<%@ include file="/WEB-INF/view/common/pagination.jsp"%>
 		</td>
		  </tr>
		</table>


		<br/><br/><br/><br/><br/>
		<div><jsp:include page="/include/footer.inc"></jsp:include></div>
	</body>
</html>